Question: $f(x, y, z) = \left( x^2, y^2, y^{\pi y} \right)$ $\text{div}(f) = $
Answer: The formula for divergence in three dimensions is $\text{div}(f) = \dfrac{\partial P}{\partial x} + \dfrac{\partial Q}{\partial y} + \dfrac{\partial R}{\partial z}$, where $P$ is the $x$ -component of $f$, $Q$ is the $y$ -component, and $R$ is the $z$ -component. Let's differentiate! $\begin{aligned} \dfrac{\partial P}{\partial x} &= \dfrac{\partial}{\partial x} \left[ x^2 \right] \\ \\ &= 2x \\ \\ \dfrac{\partial Q}{\partial y} &= \dfrac{\partial}{\partial y} \left[ y^2 \right] \\ \\ &= 2y \\ \\ \dfrac{\partial R}{\partial z} &= \dfrac{\partial}{\partial z} \left[ y^{\pi y} \right] \\ \\ &= 0 \end{aligned}$ Adding the three partial derivatives, $\text{div}(f) = 2x + 2y$.